﻿<!--
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
-->

<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="using:WinRTXamlToolkit.Controls">
    <Style
        TargetType="controls:TreeView">
        <Setter
            Property="Background"
            Value="Transparent" />
        <Setter
            Property="Foreground"
            Value="#FF000000" />
        <Setter
            Property="HorizontalContentAlignment"
            Value="Left" />
        <Setter
            Property="VerticalContentAlignment"
            Value="Top" />
        <!--<Setter Property="Cursor" Value="Arrow" />-->
        <Setter
            Property="BorderThickness"
            Value="1" />
        <Setter
            Property="Padding"
            Value="1" />
        <Setter
            Property="BorderBrush"
            Value="{x:Null}" />
        <Setter
            Property="IsTabStop"
            Value="True" />
        <Setter
            Property="TabNavigation"
            Value="Once" />
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="controls:TreeView">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="MouseOver" />
                                <VisualState
                                    x:Name="Pressed" />
                                <VisualState
                                    x:Name="Disabled" />
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualState
                                    x:Name="Unfocused" />
                                <VisualState
                                    x:Name="Focused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Border
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="2">
                            <Border
                                Padding="{TemplateBinding Padding}"
                                Background="{TemplateBinding Background}"
                                Margin="1">
                                <ScrollViewer
                                    x:Name="ScrollViewer"
                                    HorizontalScrollBarVisibility="Auto"
                                    VerticalScrollBarVisibility="Auto"
                                    Background="{x:Null}"
                                    BorderBrush="Transparent"
                                    BorderThickness="0"
                                    IsTabStop="False"
                                    TabNavigation="Once">
                                    <ItemsPresenter
                                        Margin="5" />
                                </ScrollViewer>
                            </Border>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>